8.1.2 Create a legal currency payment order
#Brief description: Obtain cash (legal currency) payment (recharge) order
- Request method: POST
- Request interface: https://gateway-domain/wallet-trade-merchant/v1/receive/cash/payment/create
- Request media type (JSON data format)Content-Type: application/json
**Note: During the callback process for this type of order, the order may time out due to our platform's delay in receiving payment, resulting in a failed callback. But when the money arrives, the system will automatically reissue the callback successfully. Therefore, the merchant only needs to handle the status = "SUCCESS" (order successful) callback. **
Request parameters
| Parameter name | Type | Required | Parameter meaning | Parameter description |
|---|---|---|---|---|
key | string | Yes | Merchant key | apiKey |
localOrderId | string | Yes | Merchant platform local order number | Merchant platform generates unique order number locally |
localUserId | string | No | Merchant platform local user ID | Merchant platform local user ID |
notifyUrl | string | No | Callback address | After the order is successfully placed, the address of the merchant will be notified by API callback (callback details are at the bottom) |
successRedirectUrl | string | No | Jump address | Automatically jump to address after success |
channelCode | string | Yes | Channel code | Get the channel code (channelCode field) through the document 8.1.1 interface |
currency | string | Yes | Currency | Order pricing currency |
amount | number | Yes | Amount | Order pricing amount |
localUserRealName | string | No | Local user’s real name | |
sign | string | Yes | Signature | See Signature Algorithm for details |
Request json sample
{
"key": "dNNTJZpgFVWlYrVv",
"localOrderId": "conantest344",
"localUserId": "conan",
"notifyUrl": "http://127.0.0.1:8080/merchant-demo/notify/test",
"isBlockchain": true,
"channelCode":"tencentest9",
"currency": "CNY",
"amount": "100",
"localUserRealName":"柯南",
"sign": "9662c0f104123b0ccac049108f174589"
}
Response json example
{
"code": 0,
"success": true,
"message": null,
"data": {
"orderId": 352950471221317,
"localOrderId": "conantest344",
"uiUrl": "http://im.topup.dianfus.dx.com/imserver/chat/Yy9kQ3IvVXNta3BwWE5sUzUvYVM3M2hHU0UrNjlnSzRjdVpGa1BHWmR1RUdLU0daa3pDNjZqbm1QOTRlUnRULzI5TmNyWFhjV2xJc3ZGZFVzdTFWY2tkWHF1Tk1yeUxDajFod01QRk83K2FrVnIvRm1YY0ZpUzBOK001NEZXbXhzd0ZxdzhPUVFlaGlaTCttbFdML04wb3VPZ3kvUDFkdHJISlhwVjlXVE1JPQ=="
}
}
Response data parameter description
| Parameter name | Type | Parameter meaning |
|---|---|---|
orderId | long | Order ID |
localOrderId | string | Merchant platform local order number |
uiUrl | string | Payment link address |
Callback details
**Note: When merchants with this type of order process callback notifications, our platform may delay receiving payment, causing the order collection to time out, thus triggering a callback notification of failed orders. When the money is actually received, the system will automatically call back the successful reissue. ** **Therefore, for such orders, merchants only need to process the callback with status = "SUCCESS" (order successful) as the final valid result. **
The callback method is: POST application/json
Example of jsonization of callback parameters
{
"amount":"100",
"currency":"CNY",
"localOrderId":"conantest344",
"merchantId":302992856974,
"merchantUserId":"conan",
"notifyTime":1757577957437,
"orderCreateTime":1757577574425,
"orderId":"352950471221317",
"paidAmount":"100",
"status":"SUCCESS",
"type":"PAYMENT",
"isReissue":"true",
"sign":"774720acbacafca99af62b98d72154d3",
"key":"9yUreYgTRtit39Dy"
}
| Parameter name | Type | Participating signature | Parameter meaning | Parameter description |
|---|---|---|---|---|
amount | decimal | Yes | Order Amount | |
currency | string | Yes | Currency | |
localOrderId | string | Yes | Merchant local order number | |
merchantId | string | Yes | Merchant ID | |
merchantUserId | string | Yes | Merchant platform local user ID | |
notifyTime | long | Yes | Callback time | Milliseconds |
orderCreateTime | long | Yes | Order Creation Time | Milliseconds |
orderId | string | Yes | Order number | |
paidAmount | decimal | Yes | Payment amount | |
status | string | Yes | Order Status | SUCCESS: Completed | FAIL: Failed |
type | string | Yes | Order type | PAYMENT payment, WITHDRAW withdrawal |
isReissue | boolean | Yes | Reissue | true Yes |
sign | string | No | md5 signature | See signature algorithm for details |
key | string | Yes | Merchant key |
When you receive the callback notification, please directly return the string success after the processing is completed, indicating that the message has been successfully received and processed. After the system receives the success response, it will no longer send the callback repeatedly. If the expected response is not received (success is not returned or an exception is returned), the system will resend the callback notification according to the stepped retry mechanism, retrying up to 14 times. The current retry intervals are: 15s, 15s, 30s,180s, 600s, 1200s, 1800s, 1800s, 1800s,3600s,10800s,10800s,21600s, 21600s